import os
import platform

env = DefaultEnvironment()
env.Append(CCFLAGS=' -g -Wall -Werror')

env['objroot'] = env.Dir('build').abspath
env['srcroot'] = env.Dir('.').abspath
Export('env')

subdir = ['common', 'ch02', 'ch06', 'ch07', 'ch10']
for x in subdir:
  target_dir = '%s/%s' % (env['objroot'], x)
  SConscript('%s/%s/SConscript' % (env['srcroot'], x), variant_dir=target_dir, duplicate=0)
